/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.testis.wirelesssecuritymodule.core;

import org.testis.utils.OsInfo;
import org.testis.wirelesssecuritymodule.data.WirelessSecurityModuleDataObject;

/**
 *
 * @author nurhat
 */
public class WirelessConnectionProviderFactory {

    public static WirelessConnectionSupplier getInstance(WirelessSecurityModuleDataObject dObj) {
         if (OsInfo.isWindows()) {
            return new WlanApiProvider(dObj);
        } else  if (OsInfo.isLinux()) {
            return new WpaSupplicantProvider(dObj);
        } else {
            throw new UnsupportedOS("Running on unsupported OS...");
        }
    }
}
